/* the on-disk structures */

#ifndef _LFS_FS_H
#define _LfS_FS_H

#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/timer.h>

typedef uint32_t lfsid_t;
typedef __u64	lfs_ino_t;
typedef __u64	lfs_blk_t;

#define LFS_SUPER_BLOCK_BLKNO	3

#define LFS_SUPER_MAGIC	0x20051015

#define LFS_MAX_FILENAME_LEN	255

/* object signatures */
#define LFS_SB_SIGNATURE	"LFS"
#define LFS_INODE_SIGNATURE	"LFSINODE"
/* and others like extent block, group desc, xattr, dir, etc. */

struct lfs_sb;

struct lfs_extent_record;

struct lfs_inline_data;

struct lfs_inode;

struct lfs_dir_entry;


struct lfs_inode_info {
	unsigned int	mode;
	unsigned int	nlink;
	unsigned int 	uid;
	unsigned int	gid;
	
	lfs_ino_t	ino;
		
};

struct lfs_addr {
	struct sockaddr_storage sa;
	int addrlen;
};
struct lfs_connection;


struct lfs_mount_opt {
};

extern struct kmem_cache * lfs_inode_cache;
extern struct kmem_cache * lfs_dentry_cache;

struct lfs_io {
	struct lfs_write_ctl *wctl;

};

static inline struct lfs_sb * lfs_sb(struct super_block *sb)
{
	return (struct lfs_sb *) sb->s_fs_info;
}

#endif
